#ifdef VECTOR_H

using namespace std;
template< int N, class T >
Vector< N, T >::Vector()
{
	for( int i = 0; i < N; ++i )
	{
		m_data[ i ] = 0;
	}
}

template< int N, class T >
Vector< N, T >::~Vector()
{}

template< int N, class T >
void Vector< N, T >::operator = ( Vector< N, T > vect )
{
	for( int i = 0; i < N; ++i )
	{
		m_data[ i ] = vect[ i ];
	}
}

template< int N, class T >
string Vector< N, T >::toString()
{
	ostringstream myStream;
	myStream << "{ ";
	for( int i = 0; i < N; ++i )
	{
		myStream << m_data[ i ];
		if( i < N - 1 )
		{
			myStream << ", ";
		}
	}
	myStream << " }";
	return myStream.str();
}

template< int N, class T >
void Vector< N, T >::operator *= ( T n )
{
	for( int i = 0; i < N; ++i )
	{
		m_data[ i ] = m_data[ i ] * n;
	}
}

template< int N, class T >
T& Vector< N, T >::operator [] ( int i )
{
	return m_data[ i ];
}

template< int N, class T >
Vector< N, T > Vector< N, T >::operator * ( T n )
{
	Vector< N, T > v;
	for( int i = 0; i < N; ++i )
	{
		v[ i ] = m_data[ i ] * n;
	}
	return v;
}

template< int N, class T >
Vector< N, T > Vector< N, T >::operator+( Vector< N, T > vect )
{
	Vector< N, T > v;
	for( int i = 0; i < N; ++i )
	{
		v[ i ] = m_data[ i ] + vect[ i ];
	}
	return v;
}

template< int N, class T >
void Vector< N, T >::operator+=( Vector< N, T > vect )
{
	for( int i = 0; i < N; ++i )
	{
		m_data[ i ] = m_data[ i ] + vect[ i ];
	}
}

#endif
